/***********************************************************************
 * SimpleSDL For D Programming Language
 *
 * This is a very simple wrapper to DerelictSDL in D Programming 
 * Language.
 *
 * Currently it is useless at all.
 *
 * Authors:   Brian Hsu (brianhsu.hsu [nospamat] gmail [dot] com)
 * Copyright: Brian Hsu, 2008.
 *
 * Bugs:
 *    May have memory leaks.
 *
 * License: GNU GPL
 *
 *   This file is part of SimpleSDL.
 *
 *   SimpleSDL is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   SimpleSDL is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with SimpleSDL.  If not, see http://www.gnu.org/licenses/.
 */
module SimpleSDL.main;

private import derelict.sdl.sdl;
private import tango.io.Stdout;

static this ()
{
    DerelictSDL.load ();
}

void initSDL ()
{
    int success = SDL_Init (SDL_INIT_VIDEO|SDL_INIT_AUDIO);

    if (success < 0) {
        throw new Exception ("Could not init SDL");
    }
}
